<include file="Public:header"/>
<link href="__PUBLIC__/Catalog/css/detailsmm.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="{:U('Products/index')}" id="back"> < </a>详情<a href="#" id="more">分享</a>
         </div>
   </div>
   <div class="content">
      <div class="pic">
      	<img src="__PUBLIC__/images/products/thumb/m_{$productImages[0]['image']}" />
      <!-- 	<if condition="$productImages eq ''">
      		<img src="__PUBLIC__/Catalog/images/pic.png" />
      	</if>
	      <foreach name="productImages" item="vo">
	     	 <img src="__PUBLIC__/images/products/thumb/m_{$vo.image}" />
	      </foreach> -->
      </div>
      <div class="des"><p><if condition="$productsDetail['products_type'] eq 2">[拍卖]<else/>[一口价]</if>{$productsDetail.products_name}</p></div>
      <div class="date"><span id="dates">{$productsDetail.products_date_added}</span><span id="clicks">{$productsDetail.viewd}</span><a href="<if condition="$uid eq ''">{:U('Products/collect')}?pid={$productsDetail.products_id}<else/>javascript:collect('{$productsDetail.products_id}','{$uid}');</if>" id="co">收藏</a></div>
      <div id="ads">
         	<p><span id="ads1">个人</span>
         	<if condition="$productsDetail['products_type'] eq 3">公益品<else/>一口价<strong id="ads2">{$productsDetail.products_price}元</strong></if></p>
            <p><span id="ads3">{$productsDetail.city_name}-{$productsDetail.area_name}</span></p>
           	<if condition="$productsDetail['products_type'] eq 3">
           		 <span onclick="<if condition="$productsDetail['uid'] eq $uid">javascript:alert('不能获取自己发布的公益商品');<else/>javascript:$('#buyconfirm').css('display','block');</if>" class="xiadan">下单获取</span>
           	</if>
	            <if condition="$productsDetail['products_type'] eq 2"><a href="<if condition="$productsDetail['uid'] eq $uid">javascript:alert('不能给自己发布的商品出价');<else/>{:U('Products/auction')}?pid={$productsDetail.products_id}</if>" style="margin-left:20px;" class="xiadan">拍卖出价</a></if>
	           <if condition="$productsDetail['products_type'] eq 2 || $productsDetail['products_type'] eq 1"> <span onclick="<if condition="$productsDetail['uid'] eq $uid">javascript:alert('不能购买自己发布的商品');<else/>javascript:$('#buyconfirm').css('display','block');</if>" class="xiadan">下单购买</span></if>
          
      </div>
      <div id="contact">
         	<p><span id="contact1">  {$productsDetail.contact_person} 【交易评分5.0分】</span><a href="javascript:$('#contacttel').css('display','block');" class="xiadans">联系电话</a></p>
            <p><span id="contact3">{$productsDetail.contact_wechat}</span></p>
            <if condition="$productsDetail['contact_qq'] neq ''"><a href="#{$productsDetail.contact_qq}" id="xiadans">联系QQ</a><else/><a href="{:U('Products/leaveword')}?publishuid={$productsDetail.uid}&pid={$productsDetail.products_id}" id="xiadans">给我留言</a></if>
            <a href="#{$productsDetail.contact_tel}" id="xiadans2">拨打电话</a>
      </div>
      <div id="contact11">
         	<p><span id="contact111"> 拍卖纪录</p>
            <p>
            	<span id="contact112">起步价：{$productsDetail.products_paimai_price}</span><br/>
            	<foreach name="nowprice" item="vo">
            		<span id="contact112">{$vo.price}元--{$vo.add_date}</span>
            	</foreach>
            </p>
      </div>
      <div id="ct">
            <p><span id="ct2">详细描述 >></span><a href="{:U('Products/report')}?pid={$productsDetail.products_id}" id="ct1">举报商品</a></p>
            <p id="cts">{$productsDetail.products_description}</p>
      </div>
      <div id="ewei">
            <p id="ewei2"><img src="__PUBLIC__/Catalog/images/ewei.png" /></p>
            <p id="ewei1">长按图片识别二维码，关注获取更多相关信息</p>
      </div>
      <div id="list">
          <div id="listTitle">其它信息 >></div>
          <div class="products_list">
           <table>
                <foreach name="productlist" item="vo">
                 <tr bordercolor="#FF0000">
                    <td style="width:80px; height:70px;"><a href="#"><img src="__PUBLIC__/images/products/{$vo.products_image}" /></a></td>
                    <td style="width:190px; height:70px; padding-left: 5px;">
                        <dl class="dls">
                           <dt><a href="#" style="font-size:18px; color:#000;">{$vo.products_name}</a></dt>
                           <dd><a href="#" class="phone">{$vo.contact_tel}  {$vo.contact_person}</a></dd>
                           <dd><a href="#" class="dingwei">{$vo.prov_name}-{$vo.city_name}</a></dd>
                           <dd><span class="time">{$vo.products_date_added}</span> <span class="what">{$vo.viewd}</span></dd>
                        </dl>
                    </td>
                    <td style="width:70px; height:70px;">
                           <p class="cc"><if condition="$vo['up_flag'] eq 1"><a href="#" class="ding"></a></if>
                           <if condition="$vo['jiaji_flag'] eq 1"><a href="#" class="ji"></a></if></p>
                    </td>
                </tr>
                </foreach>
           </table>
           </div>
      </div>
   </div>
</div>
<div class="foot"><p><a href="{:U('Products/index')}?cid={$cid}">查看更多手机配件信息</a></p></div>
<div class="foot1" style="display:none;" id="buyconfirm">
    <div class="foot2">
        <span class="foot2i">确认提示：</span>
        <a class="foot2x" onclick="javascript:$('#buyconfirm').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
    	<p>建议您先联系卖家确认后再行购买或获取</p>
        <a class="go" id="havenshow" href="{:U('Order/index')}?pid={$productsDetail.products_id}">已确认</a>
        <a class="del" id="noshow"  href="javascript:$('#buyconfirm').css('display','none');">再看看</a>
    </div>
</div>

<div class="foot1" style="display:none;" id="contacttel">
    <div class="foot2">
        <span class="foot2i">联系方式：</span>
        <a class="foot2x" onclick="javascript:$('#contacttel').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
    	{$productsDetail.contact_tel} 
    </div>
</div>
<script>
$(function(){
    if('{$msg}'!='0'){
        alert('{$msg}');
    }
});
function collect(pid,uid){
	$.ajax({
		type:"post",
		url:"{:U('Products/collect')}",
		datatype:'json',
		data:{pid:pid,uid:uid},
		success:function(result){
			datacontent =window.JSON.parse(result);
				alert(datacontent.msg);
		},
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			alert(XMLHttpRequest.status);
			alert(XMLHttpRequest.readyState);
			alert(textStatus);
		},
	});
}

</script>
<include file="Public:footer" />
